package com.scuthnweb.action.authority;


import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;

/**
 * 
 * @author YJ.Huang
 *
 */
public class PageForwardServlet extends ActionSupport{
    private String p;
    private Integer id;
    private Integer pid;
    
    private final String PREFIX_PATH = "/WEB-INF/jsp/";
    
    public String execute(){
    	if(this.id!=null)
    	   ActionContext.getContext().getSession().put("id", this.id);
    	if(this.pid!=null)
     	   ActionContext.getContext().getSession().put("pid", this.pid);
    	return PREFIX_PATH + p.split("\\?")[0];
    }

	public String getP() {
		return p;
	}

	public void setP(String p) {
		this.p = p;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getPid() {
		return pid;
	}

	public void setPid(Integer pid) {
		this.pid = pid;
	}
    
}
